home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Belgian Amiga Club - ADF Collection
/
BS1 part 60.zip
/
BS1 part 60
/
Kick Pascal v2.10 d2.adf
/
SYSPROG
/
KeyCodes.p
< prev
next >
Wrap
Text File
|
1990-11-01
|
2KB
|
73 lines
Program KeyCodes;
Var
Zeiger: ^Byte;
LastKey: Byte;
Procedure Decode(i: integer);
{ Bezeichnung der Taste mit dem Code "i" ausgeben }
Var Zeile1, Zeile2, Zeile3, Zeile4: String[16];
Begin
Zeile1:= '~1234567890ß´\';
Zeile2:= 'QWERTZUIOPÜ+';
Zeile3:= 'ASDFGHJKLÖÄ#';
Zeile4:= '<YXCVBNM,.-';
If (i >= $50) and (i <= $59) Then
write('Funktionstaste ', i-$4f)
Else
If (i >= $00) and (i <= $0d) Then
write(Zeile1[i+1])
Else
If (i >= $10) and (i <= $1b) Then
write(Zeile2[i-$0f])
Else
If (i >= $20) and (i <= $2b) Then
write(Zeile3[i-$1f])
Else
If (i >= $30) and (i <= $3a) Then
write(Zeile4[i-$2f])
Else
Case i of
$40: write('Space');
$41: write('Backspace');
$42: write('Tab');
$43: write('Enter');
$44: write('Return');
$45: write('Escape');
$46: write('Delete');
$4b: write('- im Ziffernblock');
$4c: write('Cursor Hoch');
$4d: write('Cursor Runter');
$4e: write('Cursor Rechts');
$4f: write('Cursor Links');
$5e: write('+ im Ziffernblock');
$5f: write('Help');
$60: write('Linkes Shift');
$61: write('Rechtes Shift');
$62: write('Caps Lock');
$63: write('Ctrl');
$64: write('Linkes Alt');
$65: write('Rechtes Alt');
$66: write('C=');
$67: write('Amiga');
Otherwise
write('Unbekannte Taste Nr. ',i);
End;
End;
Begin
Zeiger := Ptr($bfec01);
LastKey := Zeiger^;
writeln('Beenden mit RETURN');
writeln;
Repeat
While Zeiger^ = LastKey Do ; { auf andere Taste warten }
LastKey := Zeiger^;
Decode((LastKey div 2) xor $7f);
If odd(LastKey) Then
writeln(' gedrückt.')
Else
writeln(' losgelassen.');
Until LastKey=2*$3b
End.